﻿using System.ComponentModel.DataAnnotations;

namespace VisionCloud.Domain.DtoModel.Sys
{
    /// <summary>
    /// 终端类型枚举
    /// </summary>
    public enum TokenTypeEnum
    {
        /// <summary>
        /// 网页终端
        /// </summary>
        Web = 0,

        /// <summary>
        /// 移动终端
        /// </summary>
        SurfaceApp = 1,

        /// <summary>
        /// 小程序终端
        /// </summary>
        Applet = 2,

        /// <summary>
        /// 其他类型终端
        /// </summary>
        Other,
    }

    public class LoginDto : SysBaseDto
    {
        [Required(ErrorMessage = "用户名不能为空")]
        public string UserName { get; set; }

        [Required(ErrorMessage = "密码不能为空")]
        public string Password { get; set; }

        public string Project { get; set; }

        public TokenTypeEnum TokenType { get; set; } = TokenTypeEnum.Web;
    }
}